/**
 *  学习目标：使用useEffect来实现修改htmml的title
 */
import React, { useEffect, useState } from 'react';

export default function App() {
    // 1.声明一个count
    const [count, setCount] = useState(0)
    // 2.监听count的变化，实时修改document.title
    useEffect(() => {
        document.title = count
    })
    return (
        <div>
            count--{count}
            <button onClick={() => setCount(count + 1)}>修改title</button>
        </div>
    );

}

export const functionName = (params) => {

}
